Authentication - Fraudulent traffic detector

Authentication

How to authenticate with the API

Once a Plan is registered in IPHunter, you will have access to a API Key that you will have to send in the application when you consult an IP. This API Key will have to send it in the headers of the request, so that they register as your requests and we can track them correctly.
The method that we use will be GET.

Example Authentication in PHP

<?php
$headers = [
    'X-Key: APIKEY',
];
$ip = '148.56.53.217';
$ch = curl_init("https://www.iphunter.info:8082/v1/ip/".$ip);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$output = curl_exec($ch);
curl_close($ch);

This is just an example of what are the steps to authenticate a request. Very simple: Using the GET method, calling our Endpoint and sending as header the X-Key that we have generated in the acquired plan.